package encore.portal.container;

import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.Event;
import javax.portlet.EventRequest;
import javax.portlet.EventResponse;
import javax.portlet.PortletContext;
import javax.portlet.PortletSession;
import javax.portlet.RenderRequest;
import javax.portlet.ResourceRequest;
import javax.portlet.ResourceResponse;
import javax.servlet.http.HttpSession;

public interface PortletEnvironmentService {
	
	/**
	 * 创建portlet ActionRequest
	 * @param requestContext
	 * @param responseContext
	 * @return
	 */
	public ActionRequest createActionRequest(PortletRequestContext requestContext,PortletActionResponseContext responseContext);
	
	/**
	 * 创建portlet ActionResponse
	 * @param actionResponseContext
	 * @return
	 */
	public ActionResponse createActionResponse(PortletActionResponseContext actionResponseContext);
	
	/**
	 * 创建Portlet EventRequest
	 * @param requestContext
	 * @param eventResponseContext
	 * @param event
	 * @return
	 */
	public EventRequest createEventRequest(PortletRequestContext requestContext,PortletEventResponseContext eventResponseContext,Event event);
	
	/**
	 * 创建portlet 的 EvnentResponse;
	 * @param eventResponseContext
	 * @return
	 */
	public EventResponse createEventResponse(PortletEventResponseContext eventResponseContext);
	
	/**
	 * 创建portlet 的 RenderRequest
	 * @param requestContext
	 * @param renderResponseContext
	 * @return
	 */
	public RenderRequest createRenderRequest(PortletRequestContext requestContext,PortletRenderResponseContext renderResponseContext );
	
	/**
	 * 创建portlet 的 ResouceRequest
	 * @param resourceRequestContext
	 * @param resourceResponseContext
	 * @return
	 */
	public ResourceRequest createResourceRequest(PortletResourceRequestContext resourceRequestContext,PortletResourceResponseContext resourceResponseContext);
	
	/**
	 * 创建portlet 的ResourceResponse
	 * @param resourceResponseContext
	 * @param licyle
	 * @return
	 */
	public ResourceResponse createResourceResponse(PortletResourceResponseContext resourceResponseContext,String licyle);
	
	/**
	 * 创建portlet的PortletSession
	 * @param portletContext
	 * @param portletWindow
	 * @param httpSession
	 * @return
	 */
	public PortletSession createPortletSession(PortletContext portletContext,PortletWindow portletWindow,HttpSession httpSession);
	
}
